package com.ruoyi.web.wuliu.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.web.wuliu.mapper.ShufflingFigureMapper;
import com.ruoyi.web.wuliu.domain.ShufflingFigure;
import com.ruoyi.web.wuliu.service.IShufflingFigureService;

/**
 * 轮播图Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-11-19
 */
@Service
public class ShufflingFigureServiceImpl implements IShufflingFigureService 
{
    @Autowired
    private ShufflingFigureMapper shufflingFigureMapper;

    /**
     * 查询轮播图
     * 
     * @param id 轮播图主键
     * @return 轮播图
     */
    @Override
    public ShufflingFigure selectShufflingFigureById(Long id)
    {
        return shufflingFigureMapper.selectShufflingFigureById(id);
    }

    /**
     * 查询轮播图列表
     * 
     * @param shufflingFigure 轮播图
     * @return 轮播图
     */
    @Override
    public List<ShufflingFigure> selectShufflingFigureList(ShufflingFigure shufflingFigure)
    {
        return shufflingFigureMapper.selectShufflingFigureList(shufflingFigure);
    }

    /**
     * 新增轮播图
     * 
     * @param shufflingFigure 轮播图
     * @return 结果
     */
    @Override
    public int insertShufflingFigure(ShufflingFigure shufflingFigure)
    {
        return shufflingFigureMapper.insertShufflingFigure(shufflingFigure);
    }

    /**
     * 修改轮播图
     * 
     * @param shufflingFigure 轮播图
     * @return 结果
     */
    @Override
    public int updateShufflingFigure(ShufflingFigure shufflingFigure)
    {
        return shufflingFigureMapper.updateShufflingFigure(shufflingFigure);
    }

    /**
     * 批量删除轮播图
     * 
     * @param ids 需要删除的轮播图主键
     * @return 结果
     */
    @Override
    public int deleteShufflingFigureByIds(Long[] ids)
    {
        return shufflingFigureMapper.deleteShufflingFigureByIds(ids);
    }

    /**
     * 删除轮播图信息
     * 
     * @param id 轮播图主键
     * @return 结果
     */
    @Override
    public int deleteShufflingFigureById(Long id)
    {
        return shufflingFigureMapper.deleteShufflingFigureById(id);
    }

    @Override
    public List<ShufflingFigure> getAll() {
        List<ShufflingFigure> list = shufflingFigureMapper.getAll();
        return list;
    }
}
